package cn.edu.neusoft.practice.mapper;

//G3王胤霖

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import cn.edu.neusoft.practice.po.Special;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;


@Mapper
public interface SpecialMapper extends BaseMapper<Special> {
	@Select("(select `user`.* from `user` join special on `user`.user_id=special.user_id)")
	List<Special> getSpecialsWithUser();//显示user表里有special属性的用户全部信息
	
	@Select("insert into special(user_id) values(#{userId})")
	List<Special> addSpecial(int userId);//加
	
	@Select("select* from special")
	List<Special> getAllSpecials();//查
	
	@Select("update special set delete_flag=1 where user_id=#{userId}")
	List<Special> logicdelete(int userId);//逻辑删除

}
